package com.mygdx.screens;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.mygdx.game_helper.InputHandler;
import com.mygdx.game_world.GameRenderer;
import com.mygdx.game_world.GameWorld;

public class GameScreen implements Screen{

	GameWorld myWorld;
	GameRenderer renderer;
	
	public GameScreen() {
		float screenWidth = Gdx.graphics.getWidth();
		float screenHeight = Gdx.graphics.getHeight();
		int gameWidth = (int) screenWidth;
		int gameHeight = (int) screenHeight;
		
		myWorld = new GameWorld(gameWidth, gameHeight);
		Gdx.input.setInputProcessor(new InputHandler(myWorld));
		renderer = new GameRenderer(myWorld, gameWidth, gameHeight);
	}
	
	@Override
	public void render(float delta) {
		// TODO Auto-generated method stub
		
		myWorld.update(delta);
		renderer.render(delta);
	}

	@Override
	public void resize(int width, int height) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub
		
	}

}
